package com.kedi.usercenter.read.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface ChildrensetMapper {

    /**
    * 方法实现说明 查找亲情号码
    * @author      ytw
    *@param
    * @return
    * @exception
    * @date        2019/8/2 17:23
    */
    @Select("select affection_phone_id,p_user_id,phone,relation,idcard from affection_phone where p_user_id=#{p_user_id}")
    List<Map<String,Object>> findaffectionphone(Integer p_user_id);

    /**
    * 方法实现说明  查找药品
    * @author      ytw
    *@param
    * @return
    * @exception
    * @date        2019/8/2 17:24
    */
    @Select("select mydrug_id,p_user_id,drug_name,DATE_FORMAT(mydrug.startime,'%H:%i') as startime,DATE_FORMAT(mydrug.endtime,'%H:%i') as endtime,stage,size from mydrug where p_user_id=#{p_user_id}")
    List<Map<String,Object>> findmydrug(Integer p_user_id);
}
